package com.xiaofeng.pochi.mapper;

import com.xiaofeng.pochi.pojo.ShopUserStatistic;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/08/22/21:24
 * @Description:
 */
@Component
public interface ShopUserStatisticMapper {

    /**
     * 保存
     * @param statistic
     */
    void save(ShopUserStatistic statistic);


    /**
     * 根据用户ID查询
     * @param id
     * @return
     */
    ShopUserStatistic getByUserId(Long id);

    /**
     * 更新
     * @param shopUserStatistic
     */
    void update(ShopUserStatistic shopUserStatistic);

    /**
     * 查询累计消费最多的前十个用户
     */
    List<ShopUserStatistic> getTopStatistic();

}
